Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ml-gsd

Package Overview
Dependencies
Maintainers
10
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ml-gsd

Global Spectra Deconvolution

  • 5.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4K
increased by19.41%
Maintainers
10
Weekly downloads
 
Created
Source

global-spectral-deconvolution

NPM version build status David deps npm download

Global Spectra Deconvolution + Peak optimizer

API documentation

Parameters

minMaxRatio=0.00025 (0-1)

Threshold to determine if a given peak should be considered as a noise, bases on its relative height compared to the highest peak.

broadRatio=0.00 (0-1)

If broadRatio is higher than 0, then all the peaks which second derivative smaller than broadRatio * maxAbsSecondDerivative will be marked with the soft mask equal to true.

noiseLevel=0 (-inf, inf)

Noise threshold in spectrum units

maxCriteria=true [true||false]

Peaks are local maximum(true) or minimum(false)

smoothY=true [true||false]

Select the peak intensities from a smoothed version of the independent variables?

realTopDetection=false [true||false]

Use a quadratic optimizations with the peak and its 3 closest neighbors to determine the true x,y values of the peak?

sgOptions={windowSize: 5, polynomial: 3}

Savitzky-Golay parameters. windowSize should be odd; polynomial is the degree of the polynomial to use in the approximations. It should be bigger than 2.

heightFactor=0

Factor to multiply the calculated height (usually 2).

derivativeThreshold=0

Filters based on the amplitude of the first derivative

Post methods

GSD.post.broadenPeaks(peakList, {factor=2, overlap=false})

We enlarge the peaks and add the properties from and to. By default we enlarge of a factor 2 and we don't allow overlap.

GSD.post.joinBroadPeaks

GSD.post.optimizePeaks

Example

var CC = require('chemcalc');
var Stat = require('ml-stat');
var peakPicking = require('ml-gsd');

var spectrum = CC.analyseMF('Cl2.Br2', {
  isotopomers: 'arrayXXYY',
  fwhm: 0.01,
  gaussianWidth: 11
});
var xy = spectrum.arrayXXYY;
var x = xy[0];
var y = xy[1];
//Just a fake noiseLevel
var noiseLevel =
  Stat.array.median(
    y.filter(function(a) {
      return a > 0;
    })
  ) * 3;

var options = {
  noiseLevel: noiseLevel,
  minMaxRatio: 0,
  broadRatio: 0,
  smoothY: false,
  realTopDetection: true
};
var result = peakPicking.gsd(x, y, options);
result = peakPicking.post.optimizePeaks(result, x, y, 1, 'gaussian');

License

MIT

Keywords

FAQs

Package last updated on 24 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc